package com.lge.simpleeventhandler;

import java.util.ArrayList;

public class Model {
    private String modelName = null;
    private String modelProject = null;
    private String modelOperator = null;
    private String modelCountry = null;

    private ArrayList<Schedule> scheduleList = null;

    private String chipsetName = null;
    private String chipsetDllpath = null;

    private String binaryDailypath = null;
    private String binaryModelpath = null;
    private String binaryDeveloperpath = null;

    
    public Model() {
        super();
        
        scheduleList = new ArrayList<Schedule>();
    }
    
    @Override
    public boolean equals(Object obj) {
        if (((Model)obj).getModelName().equals(modelName)) {
            if (((Model)obj).getModelProject().equals(modelProject)) {
                if (((Model)obj).getModelOperator().equals(modelOperator)) {
                    if (((Model)obj).getModelCountry().equals(modelCountry)) {
                        return true;
                    }
                }
            }
        }
        
        return false;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public String getModelProject() {
        return modelProject;
    }

    public void setModelProject(String modelProject) {
        this.modelProject = modelProject;
    }

    public String getModelOperator() {
        return modelOperator;
    }

    public void setModelOperator(String modelOperator) {
        this.modelOperator = modelOperator;
    }

    public String getModelCountry() {
        return modelCountry;
    }

    public void setModelCountry(String modelCountry) {
        this.modelCountry = modelCountry;
    }

    public ArrayList<Schedule> getScheduleList() {
        return scheduleList;
    }

    public void setScheduleList(ArrayList<Schedule> scheduleList) {
        this.scheduleList = scheduleList;
    }
    
    public int getScheduleListSize() {
        return scheduleList.size();
    }
    
    public void addScheduleToList(Schedule schedule) {
        scheduleList.add(schedule);
    }
    
    public void removeScheduleFromList(Schedule schedule) {
        scheduleList.remove(schedule);
    }
    
    public void replaceSchedule(Schedule fromSchedule, Schedule toSchedule) {
        removeScheduleFromList(fromSchedule);
        addScheduleToList(toSchedule);
    }
    
    public Schedule getModelScheduleItem(int index) {
        if (index >= 0 && index < getScheduleListSize()) {
            return scheduleList.get(index);
        } else {
            return null;
        }
    }

    public String getChipsetName() {
        return chipsetName;
    }

    public void setChipsetName(String chipsetName) {
        this.chipsetName = chipsetName;
    }

    public String getChipsetDllpath() {
        return chipsetDllpath;
    }

    public void setChipsetDllpath(String chipsetDllpath) {
        this.chipsetDllpath = chipsetDllpath;
    }

    public String getBinaryDailypath() {
        return binaryDailypath;
    }

    public void setBinaryDailypath(String binaryDailypath) {
        this.binaryDailypath = binaryDailypath;
    }

    public String getBinaryModelpath() {
        return binaryModelpath;
    }

    public void setBinaryModelpath(String binaryModelpath) {
        this.binaryModelpath = binaryModelpath;
    }

    public String getBinaryDeveloperpath() {
        return binaryDeveloperpath;
    }

    public void setBinaryDeveloperpath(String binaryDeveloperpath) {
        this.binaryDeveloperpath = binaryDeveloperpath;
    }
}